diff options
| author | Adam Soltys <[email protected]> | 2022-10-04 20:28:29 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2022-10-04 20:28:29 -0700 |
| commit | e34e0fee81a0aaebd8ff89986c1d4138c7b499c8 (patch) | |
| tree | dead06dbd4ba44f0044ba916a5294ceccf6511fe /src/routes/[username] | |
| parent | f9c6ec10476ef6cad3b7664b2d2ff618e8a3100b (diff) | |
| download | coinos-ui-e34e0fee81a0aaebd8ff89986c1d4138c7b499c8.tar.gz coinos-ui-e34e0fee81a0aaebd8ff89986c1d4138c7b499c8.zip | |
tipping fixes
Diffstat (limited to 'src/routes/[username]')
| -rw-r--r-- | src/routes/[username]/receive/+page.server.js | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/src/routes/[username]/receive/+page.server.js b/src/routes/[username]/receive/+page.server.js index 60e94f0e..1068f273 100644 --- a/src/routes/[username]/receive/+page.server.js +++ b/src/routes/[username]/receive/+page.server.js @@ -1,21 +1,5 @@ -import { auth, get, post } from '$lib/utils'; -import { redirect } from '@sveltejs/kit'; +import invoice from '$lib/invoice'; export const actions = { - default: async ({ cookies, request }) => { - let form = await request.formData(); - - let invoice = { - amount: parseInt(form.get('amount')), - network: 'lightning', - prompt: form.get('prompt') === 'true', - rate: await get('/rate') - }; - - let user = { username: form.get('username') }; - - let { uuid } = await post('/invoice', { invoice, user }, auth(cookies)); - - throw redirect(307, `/invoice/${uuid}`); - } + default: invoice }; |
